<%@ page language="java" contentType="text/html; charset=UTF-8"
	import="java.util.*,com.javabean.*,com.model.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" rev="stylesheet" href="../css/style.css"
	type="text/css" media="all" />
<script type="text/javascript" src="../js/jquery-1.9.0.js"></script>
<style type="text/css">
<!--
.atten {
	font-size: 12px;
	font-weight: normal;
	color: #F00;
}
-->
<%
String flag=request.getParameter("flag");
if(flag==null){flag="a";}
%>
</style>

<script>
	$(function(){
		// $("#passInfo").text("修改成功！");
		// $("#passInfo").text("密码错误！");
	})
	$(function(){
  	<%if(flag.equals("good")){%>
  	$("#passInfo").text("修改成功！");
  	<%}else if(flag.equals("wrong")){%>
  	$("#passInfo").text("密码错误！");
  	<%}else if(flag.equals("notequal")){%>
  	$("#passInfo").text("密码不一致！");
  	<%}%>
  	});
  
  	function save(){
	if(document.fom.newUserPassword.value == null || document.fom.newUserPassword.value == "" || document.fom.newUserPassword.value.length < 6 || document.fom.newUserPassword.value.length > 20){
		alert("密码必须是6-20位字符或数字组成");
		document.fom.newUserPassword.focus();
		return;
	}
	else{
		document.fom.submit();			
	}
}
</script>
</head>

<body class="ContentBody">
	<form action="UserDeal?flag=changePassword" method="post" id="fom" name="fom">
		<div class="MainDiv">
			<table width="99%" border="0" cellpadding="0" cellspacing="0"
				class="CContent">
				<tr>
					<th class="tablestyle_title">密码修改</th>
				</tr>
				<tr>
					<td class="CPanel">

						<table border="0" cellpadding="0" cellspacing="0"
							style="width: 100%">
							<tr>
								
							</tr>
							<tr>
								<td width="100%">
									<fieldset style="height: 100%;">
										<legend>密码信息</legend>
										<table border="0" cellpadding="2" cellspacing="1"
											style="width: 100%">

											<tr>
												<td nowrap align="right" width="15%">原始密码:</td>
												<td width="35%"><input name='oldUserPassword'
													type="password" class="text" style="width: 154px" value="" /></td>
											</tr>

											<tr>
												<td nowrap="nowrap" align="right">新密码:</td>
												<td><input type="password" class="text"
													name='newUserPassword' style="width: 154px" value="" maxlength="30" /><span class="red"></span></td>
											</tr>

											<tr>
												<td align="right">确认密码:</td>
												<td><input type="password" class="text"
													name='confirmPassword' style="width: 154px" value="" maxlength="30" /></td>
											</tr>
											<tr>
												<td></td>
												<td align="left"><div id="passInfo" style="font-size:20px;color:#f00"></div></td>
											</tr>
										</table>
										<br />
									</fieldset>
								</td>
							</tr>
						</table>
					</td>
				</tr>

				<tr>
					<td colspan="2" align="center" height="50px">
					<input type="button" name="submit1" value="保存"  class="button" onclick="save()"/> 
					<input type="button" name="Submit2" value="返回" class="button"
						onclick="window.history.go(-1);" /></td>
				</tr>
			</table>

		</div>
	</form>
</body>

</html>
